<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <title></title>
    <link rel="stylesheet" href="package/big.css"/>
    <script>
        var ConfigObj = {
            platForm: 'android', // android 平台
            isDebug: false,// 设为 true 是表示测试环境
            //version: '1.0.4' // android 平台
        }



    </script>
    <script type="text/javascript" src="package/lib.js"></script>
    <script type="text/javascript" src="package/big.js"></script>
    <script type="text/javascript" src="cordova/cordova.js"></script>

</head>
<body>

<div class="bottomcon">
    <ul class="nav nav-bot clearfix" id="home_navObj" style="display: none;">
        <li>
            <a href="javascript:void(0)" class="on" data-t="home">
                <p><em class="navicons n-lottery"></em></p>
                <span>彩票</span>
            </a>
        </li>
        <li>
            <a href="javascript:void(0)" data-t="kaijiangIndex">
                <p><em class="navicons n-kj"></em></p>
                <span>开奖</span>
            </a>
        </li>
        <!--<li>-->
            <!--<a href="javascript:void(0)" data-t="hemaiIndex">-->
                <!--<p><em class="navicons n-hm"></em></p>-->
                <!--<span>合买</span>-->
            <!--</a>-->
        <!--</li>-->
        <li>
            <a href="javascript:void(0)" data-t="newsIdx">
                <p><em class="navicons n-disc"></em></p>
                <span>资讯</span>
            </a>
        </li>
        <li>
            <a href="javascript:void(0)" data-t="userCenter">
                <p><em class="navicons n-user"></em></p>
                <span>我的</span>
            </a>
        </li>
    </ul>
</div>


<script type="text/javascript">
    Global.initNav();      //底部导航功能
if (ConfigObj.platForm == 'android') {
        Global.checkUpdate();  //检查版本更新
    }
if (ConfigObj.platForm == 'android' && typeof android_obj != 'undefined') {
//      setTimeout(function () {
//          android_obj.hideSplashscreen();
//      }, 2000)
	if(!Global.addBackEvent){  //手机硬键的返回事件
		Global.addBackEvent =  true;
		document.addEventListener('deviceready', function () {
			document.addEventListener("backbutton", exitMyapp, false);
		}, false);
		var currentTime,firstTime,secondTime,clickCount=0;
		function exitMyapp() {
			    var checkInput = function () {
                    // 获得焦点的元素
                    var elem = document.querySelectorAll(':focus');
                    if (elem.length) {
                        var focusElem = elem[0];

                        console.dir(focusElem);

                        if (focusElem.tagName == 'TEXTAREA'
                            || (focusElem.tagName == 'INPUT'
                            && ['text', 'password', 'tel', 'url', 'number', 'range', 'search'].indexOf(focusElem.type) != -1))
                            return focusElem;
                    }
                    return null;
                };

			    var checkResult = checkInput();

			    if (checkResult) {
			        // 失去焦点
                    checkResult.blur();
                } else {
                	var pageId = Global.getActivePage()[0].id;
                	if(ConfigObj.showWhere){
	                	switch (pageId){
				            case 'home':
								clickCount++;
								android_obj.toast("   再按一次退出   ");
								currentTime = new Date();
								if (clickCount == 1) {
									firstTime=currentTime.getSeconds()+currentTime.getMinutes()*60+currentTime.getHours()*3600;
								} else if(clickCount == 2){
									secondTime=currentTime.getSeconds()+currentTime.getMinutes()*60+currentTime.getHours()*3600;
									if(secondTime-firstTime<2){  
										navigator.app.exitApp();
						            }else {  
						                clickCount=0;  
						            }; 
								};
				                break;
				            default:
				                if (window[pageId + 'Obj']) {
				                    window[pageId + 'Obj'].goBack();
				                } else {
				                    homeObj.show();
				                }
				                break;
				        }
                	} else{
                		switch (pageId){
				            case 'indexNews':
								clickCount++;
								android_obj.toast("   再按一次退出   ");
								currentTime = new Date();
								if (clickCount == 1) {
									firstTime=currentTime.getSeconds()+currentTime.getMinutes()*60+currentTime.getHours()*3600;
								} else if(clickCount == 2){
									secondTime=currentTime.getSeconds()+currentTime.getMinutes()*60+currentTime.getHours()*3600;
									if(secondTime-firstTime<2){  
										navigator.app.exitApp();
						            }else {  
						                clickCount=0;  
						            }; 
								};
				                break;
				            default:
				                if (window[pageId + 'Obj']) {
				                    window[pageId + 'Obj'].goBack();
				                } else {
				                    indexNewsObj.show();
				                }
				                break;
				        }
                	}
                }
			}
	}
}
Global.checkRoute();   //检查路由



</script>
<script type="text/javascript"
        src="http://api.map.baidu.com/api?v=2.0&ak=fp726WLTWnwxBVTNORE3blaAsTiPWBy0"></script>
</body>

</html>




